package com.zues.observer;

import java.time.LocalDateTime;

public class MobileAppObserver implements WeatherObserver{

    private final String name;

    public MobileAppObserver(String name) {
        this.name = name;
    }


    @Override
    public void update(double temperature) {
        System.out.println(Thread.currentThread().getName() + ":" + name + "收到通知, 当前温度为：" + temperature + "℃" + LocalDateTime.now().toLocalTime().toString());
    }
}
